/*
 * Copyright 2020 HPB Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hpb.bc.entity;

import java.util.Date;

public class HpbInstantPrice extends BaseEntity {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_instant_price.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_instant_price.cny_price
     *
     * @mbg.generated
     */
    private String cnyPrice;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_instant_price.usd_price
     *
     * @mbg.generated
     */
    private String usdPrice;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_instant_price.change_percent
     *
     * @mbg.generated
     */
    private String changePercent;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column hpb_instant_price.update_time
     *
     * @mbg.generated
     */
    private Date updateTime;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_instant_price.id
     *
     * @return the value of hpb_instant_price.id
     * @mbg.generated
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_instant_price.id
     *
     * @param id the value for hpb_instant_price.id
     * @mbg.generated
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_instant_price.cny_price
     *
     * @return the value of hpb_instant_price.cny_price
     * @mbg.generated
     */
    public String getCnyPrice() {
        return cnyPrice;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_instant_price.cny_price
     *
     * @param cnyPrice the value for hpb_instant_price.cny_price
     * @mbg.generated
     */
    public void setCnyPrice(String cnyPrice) {
        this.cnyPrice = cnyPrice == null ? null : cnyPrice.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_instant_price.usd_price
     *
     * @return the value of hpb_instant_price.usd_price
     * @mbg.generated
     */
    public String getUsdPrice() {
        return usdPrice;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_instant_price.usd_price
     *
     * @param usdPrice the value for hpb_instant_price.usd_price
     * @mbg.generated
     */
    public void setUsdPrice(String usdPrice) {
        this.usdPrice = usdPrice == null ? null : usdPrice.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_instant_price.change_percent
     *
     * @return the value of hpb_instant_price.change_percent
     * @mbg.generated
     */
    public String getChangePercent() {
        return changePercent;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_instant_price.change_percent
     *
     * @param changePercent the value for hpb_instant_price.change_percent
     * @mbg.generated
     */
    public void setChangePercent(String changePercent) {
        this.changePercent = changePercent == null ? null : changePercent.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column hpb_instant_price.update_time
     *
     * @return the value of hpb_instant_price.update_time
     * @mbg.generated
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column hpb_instant_price.update_time
     *
     * @param updateTime the value for hpb_instant_price.update_time
     * @mbg.generated
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_instant_price
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        HpbInstantPrice other = (HpbInstantPrice) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getCnyPrice() == null ? other.getCnyPrice() == null : this.getCnyPrice().equals(other.getCnyPrice()))
                && (this.getUsdPrice() == null ? other.getUsdPrice() == null : this.getUsdPrice().equals(other.getUsdPrice()))
                && (this.getChangePercent() == null ? other.getChangePercent() == null : this.getChangePercent().equals(other.getChangePercent()))
                && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table hpb_instant_price
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCnyPrice() == null) ? 0 : getCnyPrice().hashCode());
        result = prime * result + ((getUsdPrice() == null) ? 0 : getUsdPrice().hashCode());
        result = prime * result + ((getChangePercent() == null) ? 0 : getChangePercent().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }
}